﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfTravelRoute.aspx.cs" Inherits="msBsc.WebUi.mMall.Public.mfTravelRoute" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" href="/themes/mStyle1/mSearch.css" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/public/mLogin.css" charset="gbk" />
    <link href="/themes/mStyle1/css/public/mTravelIndex.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script src="/jqPlugin/js/jBase.js"></script>
    <script src="/jqPlugin/js/jmPage.js"></script>
    <script src="/themes/Style1/jsQt.js"></script>
    <script src="/jqPlugin/js/laytpl.js"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
  <%--  <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,themes/wStyle1/js/comm/VerifyJs.js"
        type="text/javascript"></script>--%>
    <script type="text/javascript">
        $(window).load(function () {
        });



        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
        .list_nav ul li {
            width:33.33% !important;
        }
         
    </style>
    <base target="_self" />
</head>
<body>
    <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
    <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
    <input type="hidden" id="destionId" value="" />
    <input type="hidden" id="pageIndex" value="" />
    <input type="hidden" id="key" value="" />
    <div class="viewport">
        <header class="search-bar" style="">
            <%--<form id="J_shSearchForm" method="get" action="/m/mp_TravelIndex.htm>">--%>
                <div class="search-bar-tbl">
                    <div class="search-bar-cell-3">
                        <a href="javascript:void(0);" onclick="history.go(-1);" style="color: #fff; vertical-align: middle; line-height: 28px; font-size: 16px; padding-left: 6px; padding-right: 6px;">&lt;&lt;</a>
                    </div>
                    <div class="search-bar-cell-2">
                        <div class="search-textfile">
                            <%--<a id="searchbtn" href="javascript:void(0);" onclick="Search()" class="btn-home-search"></a>--%>
                            <input autocomplete="off" name="f" id="f" placeholder="请输入以下区域的路线关键字" class="search-textfile-input"/>
                        </div>
                    </div>
                    <div class="search-bar-cell-3" id="myFilterBtn">
                        <a href="javascript:void(0);" onclick="Search()" class="search">搜索</a>
                    </div>
                </div>
            <%--</form>--%>
            <div class="floor " id="divmymFilter" style="margin-top: 3px; margin-bottom: 3px;">
                <div id="content_goods_form">

                    <div class="list_nav">
                        <ul class="clearfix">
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="country_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="city_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="destion_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                //function initmymmall() {
                //    $("#myFilterBtn").live("click", function () {
                //        $("#divmymFilter").toggle('fast');
                //    });
                //};
                //initmymmall();

                //function initschListBtn() {
                //    $(".schListBtn").click(function () {
                //        var _self = $(this);
                //        if (_self.hasClass("schListBtn-type1")) {
                //            _self.removeClass("schListBtn-type1").addClass("schListBtn-type2");
                //            $("#J_ItemList").removeClass("album").addClass("list");
                //        } else {
                //            _self.removeClass("schListBtn-type2").addClass("schListBtn-type1");
                //            $("#J_ItemList").removeClass("list").addClass("album");
                //        }
                //    });
                //};
                //initschListBtn();




            </script>
        </header>
        <%--<div class="header">
            <ul style="">
                <li class="t_left" style="width:25%"><a href="/mp_Index.htm">返回</a></li>
                <li class="t_center" style="width:50%">旅游资讯</li>
                <li class="t_right" style="width:25%"><a href="/mp_Login.htm">登录</a></li>
            </ul>
        </div>--%>
        <form action='#' method="post" id="J_EmailForm">

            <div>
                <ul class="classicList" id="trvel_list">
                </ul>
                <div>
                    <div class="pager">
                        <a href="###" id="pageNextText">查询更多</a>
                    </div>
                </div>
                <%--  <div>
                    <div class="c_more">
                        <a class="more_name" id="moreScenic">景区</a>
                        <div class="more_hr"></div>
                    </div>
                </div>
                <ul class="classicList" id="scenic_list">
                </ul>
                <div>
                    <div class="c_more">
                        <a class="more_name" id="moreFood">美食</a>
                        <div class="more_hr"></div>
                    </div>
                </div>
                <ul class="classicList" id="food_list">
                </ul>
                <div>
                    <div class="c_more">
                        <a class="more_name" id="moreSpecialty">购物</a>
                        <div class="more_hr"></div>
                    </div>
                </div>
                <ul class="classicList" id="specialty_list">
                </ul>--%>
                <xmp id="svc_list_temp_route" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <li><div class="classicC"><a href="/mp_TravelRouteInfo.htm?routeId={{d.rows[i].ROUTE_ID}}"><img title="{{d.rows[i].ROUTE_TITEL}}" src="{{d.rows[i].IMAGE_EXPLAIN}} 240x198img.jpg" /><div class="classicInfo" data-value="{{d.rows[i].ROUTE_ID}}">{{d.rows[i].ROUTE_TITEL}}</div></a></div></li>
            {{#} }}
            </xmp>
            </div>


            <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
        </form>
        <script type="text/javascript">
            (function () {
                //得到参数
                $("#countryId").val(GetQueryStr("countryId"));
                $("#cityId").val(GetQueryStr("cityId"));
                $("#destionId").val(GetQueryStr("destionId"));
                $("#pageIndex").val(GetQueryStr("pIndex"));
                $("#key").val(GetQueryStr("key"));
                $("#f").val(GetQueryStr("key"));
                var countryId = $("#countryId").val();
                var cityId = $("#cityId").val();
                var destionId = $("#destionId").val();

               
                //改变国家
                $("#country_select").change(function () {
                    var countryId = $(this).val();
                    var cityId = "";
                    var destionId = "";
                    window.location.href = "/mp_TravelRoute.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1";
                });
                //改变城市
                $("#city_select").change(function () {
                    var countryId = $("#country_select").val();
                    var cityId = $(this).val();
                    var destionId = "";
                    window.location.href = "/mp_TravelRoute.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1";
                });
                //改变目的地
                $("#destion_select").change(function () {
                    var countryId = $("#country_select").val();
                    var cityId = $("#city_select").val();
                    var destionId = $(this).val();
                    window.location.href = "/mp_TravelRoute.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1";
                });
              
                //点击更多
                $("#pageNextText").live("click", function () {
                    nextPage();
                });
            })()

            //查询
            function Search() {
                var countryId = $("#country_select").val();
                var cityId = $("#city_select").val();
                var destionId = $("#destion_select").val();
                var trvelType = $("#travel_type").val();
                var keys = $("#f").val();
                window.location.href = "/mp_TravelRoute.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1&key=" + encodeURIComponent(keys);
            }

            //读取后台
            function doInit(sEbtn) {
                var pIndex = $("#pageIndex").val();
                if (IsNull(pIndex) || isNaN(pIndex)) {
                    pIndex = 1;
                }
                var _jsParam = new jsonRow();

                _jsParam.AddCell("pRows", "9");
                _jsParam.AddCell("pIndex", pIndex);
                _jsParam.AddCell("routeKey", $("#key").val());
                _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
                _jsParam.AddCell("destionId", $("#destionId").val());
                _jsParam.AddCell("cityId", $("#cityId").val());
                _jsParam.AddCell("countryId", $("#countryId").val());
                _jsParam.AddCell("ACTION", sEbtn);
                ajaxComm(_jsParam);
            }
            doInit("init");

            //显示地区
            function setCity(data, selectId, selectCity) {
                if (IsNull(data) || data.rows.length < 1) {
                    return;
                }
                $("#" + selectId).html("");
                var cityName = "";
                for (var i = 0; i < data.rows.length; i++) {
                    if (data.rows[i].COUNTRY_CITY_ID == selectCity) {
                        $("#" + selectId).append("<option selected='selected' value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                        cityName = data.rows[i].COUNTRY_CITY_NME;
                    } else {
                        $("#" + selectId).append("<option value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                    }
                }
                if (IsNull(cityName)) {
                    cityName = data.rows[0].COUNTRY_CITY_NME;
                }
                $("#" + selectId).siblings(".nav_span").children(".city_name").text(cityName);
            }

            //是否显示更多
            function showNextPage(dataCount) {
                var pIndex = $("#pageIndex").val();
                if (IsNull(pIndex)) {
                    pIndex = 1;
                }
                var pageIndex = parseInt(pIndex);
                var count = parseInt(dataCount);
                if (pageIndex * 9 < count) {
                    $(".pager").show();
                } else {
                    $(".pager").hide();
                }
            }

            //更多
            function nextPage() {
                var pIndex = $("#pageIndex").val();
                if (IsNull(pIndex) || isNaN(pIndex)) {
                    pIndex = 1;
                }
                var pageIndex = parseInt(pIndex) + 1;
                $("#pageIndex").val(pageIndex);
                doInit("morePage");
            }
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
